import React from 'react';
import {Icon} from 'antd';

class MenuContent extends React.Component {
    render() {
        return (
            <span style={{display: 'flex'}}>
                {this.props.icon ? <i className={`icon iconfont ${this.props.icon}`}
                                      style={{marginRight: 20, fontSize: 20}}></i> : null}
                {this.props.icon ? <span>{this.props.name}</span> :
                    <span style={{marginLeft: 20}}>{this.props.name}</span>}
            </span>
        )
    }
}

export default MenuContent;